package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author 朱其鹏
 * @date 2024/4/9 15:10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_coupon_maps")
public class OrderCouponMapEntity {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private Long orderId;
    private Long couponId;
    private Long couponUserMapId;
    private BigDecimal discountAmount;
    private Long userId;
    
    @ApiModelProperty(value = "影院ID")
    private Long cinemaId;
    
    @ApiModelProperty(value = "租户ID")
    private Long tenantId;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableLogic(value = "null", delval = "now()")
    @TableField(select = false)
    private LocalDateTime deletedAt;

    @TableField(exist = false)
    private CouponEntity coupon;
    
    @TableField(exist = false)
    private String couponName;

    @TableField(exist = false)
    private CouponUserMapEntity couponUserMap;
}